package com.cwg.dict.ui.rcp;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import com.cwg.dict.ui.rcp.views.DictionaryView;
import com.cwg.dict.ui.rcp.views.HistoryView;
import com.cwg.dict.ui.rcp.views.StemView;
import com.cwg.dict.ui.rcp.views.WordListView;

public class Perspective implements IPerspectiveFactory {

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		layout.addStandaloneView(WordListView.ID, true, IPageLayout.LEFT, 0.3f, editorArea);
		IFolderLayout folder = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.7f, editorArea);
		layout.getViewLayout(DictionaryView.ID).setCloseable(false);
		layout.getViewLayout(WordListView.ID).setCloseable(false);
		layout.getViewLayout(HistoryView.ID).setCloseable(false);
		layout.getViewLayout(StemView.ID).setCloseable(false);
		folder.addView(HistoryView.ID);
		folder.addView(StemView.ID);
	}
}
